Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add extensions to otel.trace #77

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

c-cube
Copy link
Member

@c-cube c-cube commented Oct 22, 2024

  • feat otel: add Span_kind.t, add {kind,set_kind} to Scope
  • feat otel.trace: extension points for links, record_exn, kind

@c-cube c-cube requested a review from mattjbray as a code owner October 22, 2024 17:27
Comment on lines +883 to +907
val to_span_link :
?trace_state:string ->
?attrs:key_value list ->
?dropped_attributes_count:int ->
t ->
Span_link.t
(** Turn the scope into a span link *)
Copy link
Contributor

@tatchi tatchi Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently doing the following in a codebase to get the span_link

scope |> Scope.to_span_ctx |> Span_link.of_span_ctx

Is the Span_link.of_span_ctx still required now that we can go directly from scope to span_link ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And if yes, should we add ?dropped_attributes_count:int to the Span_link.of_span_ctx to be consistent ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can keep both, but yes, adding the optional arguments is good for consistency.

@c-cube c-cube force-pushed the simon/trace-add-span-link branch from a83464b to e789462 Compare October 24, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants